const path = require('path')
const EslintWebpackPlugin = require('eslint-webpack-plugin')

module.exports = {
  mode: 'development',
  plugins: [
    new EslintWebpackPlugin({
      eslintPath: 'eslint',
      extensions: ['js', 'jsx', 'ts', 'tsx'],
      exclude: 'node_modules'
    })
  ],
  devServer: {
    port: 8080,
    hot: true,
    open: true,
    static: path.resolve(__dirname, '../src'),
    client: {
      progress: true
    }
  },
  resolve: {
    alias: {
      'react': path.resolve(__dirname, '../node_modules/react/umd/react.development.js')
    }
  },
  devtool: 'inline-source-map'
}